﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KGE.Define
{
    [Serializable]
    public class KSound
    {
        public string Name;
        public Guid GUID;
        public string Version;
        public DateTime CreateTime;

        public byte[] Data;
        public double Length;

        public KSound()
        {
            GUID = Guid.NewGuid();
            CreateTime = DateTime.Now;
        }

        public KSound(string fileName)
            : this()
        {
            if (fileName == null)
            {
                return;
            }
            if (fileName == string.Empty)
            {
                return;
            }
            Data = System.IO.File.ReadAllBytes(fileName);
        }
    }
}
